package com.hzx.service.impl;

import com.hzx.dao.UserMapper;
import com.hzx.pojo.User;
import com.hzx.service.UserInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserInformationServiceImpl implements UserInformationService {

    @Autowired
    UserMapper userMapper ;

    @Override
    public User getUserByUid(Integer uid) {
        return userMapper.selectByPrimaryKey(uid);
    }

    @Override
    public Integer getUidByPhone(String phone) {
        return userMapper.selectUidByphone(phone);
    }

    @Override
    public Integer insertBySelective(User user) {
        return userMapper.insertSelective(user);
    }

    @Override
    public Integer updateUserBySelective(User user) {
        return userMapper.updateByPrimaryKeySelective(user);
    }

    @Override
    public  Integer selectUserNum() {
        return userMapper.selectUserNum();
    }
}
